package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Cart;
import tech.aistar.mapper.CartMapper;
import tech.aistar.service.ICartService;

import java.util.List;

/**
 * Created by admin on 2019/12/31.
 */
@Service
public class CartServiceImpl implements ICartService{

    @Autowired(required=false)
    private CartMapper cartMapper;

    @Override
    public void save(Cart cart) {
        cartMapper.save(cart);
    }

    @Override
    public List<Cart> findByUserName(String username) {
        return cartMapper.findByUserName(username);
    }
}
